package com.tupu.service.permission;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tupu.entity.dto.UserDto;
import com.tupu.entity.permission.UserInfo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface UserService extends IService<UserInfo> {

    String register(UserInfo user);

    //批量删除用户
    void delUser(List<Integer> ids);

    //从其他系统登录时调用此方法
    Map<Object, Object> loginOther(String otherToken);

    Map<String, Object> userNum();

    //审核用户
    void approvalUser(Integer id);

    String updateUser(UserInfo user);

    UserDto findOneByUserId(Integer user_id);

    Page<UserDto> pageInfo(Integer page, Integer size, String userName, List<Integer> statusList);

    String addUser(UserInfo user);

    Map<String, Object> UploadPicture(MultipartFile file) throws IOException;

    Map<String, Object> info(String account);

    String testUser(UserInfo user);

    Map<String, Object> userLogin(HttpServletRequest request, UserInfo user);
}
